import { request } from "@/utils/request"

export const PostPatient = (data: any) => {
    return request({
        url: '/api/Patient',
        method: 'post',
        data: data
    })
}
export const GetPatients = async (): Promise<any> => {
    const res = await request({
        url: '/api/Patient',
        method: 'get',
    })
    return res
}
export const DeletePatient = async (id: number) => {
    return await request({
        url: `/api/Patient/${id}`,
        method: 'delete',
    })
}
export const PatchPatient = async (id: number, data: any) => {
    return await request({
        url: `/api/Patient/${id}`,
        method: 'patch',
        data: data
    })
}

export const PutPatient = async (id: number, data: any) => {
    return await request({
        url: `/api/Patient/${id}`,
        method: 'put',
        data: data
    })
}